<%@tag import="chances.system.operator.entity.Role"%>
<%@tag import="chances.system.operator.repo.RoleRepository"%>
<%@tag import="chances.webui.helper.LookupHelper"%>
<%@tag import="java.util.List"%>
<%@tag import="org.springframework.context.ApplicationContext"%>
<%@tag import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@ attribute name="var" required="true" type="java.lang.String" rtexprvalue="false" %>
<%
	ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(request.getServletContext());
	RoleRepository roRp = ac.getBean(RoleRepository.class);
	List<Role> roles= roRp.findAll();
	Object obj = LookupHelper.build(roles,"id","name");
	request.setAttribute(var, obj);
%>